package com.blueocean_health.care.management.controller;

import java.util.List;

import javax.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.blueocean_health.care.management.common.LocalManager;
import com.blueocean_health.care.management.domain.base.SysResult;
import com.blueocean_health.care.management.domain.base.User;
import com.blueocean_health.care.management.domain.dto.DeptFloorDto;
import com.blueocean_health.care.management.em.LocalManagerType;
import com.blueocean_health.care.management.service.DeptBuildFloorService;

/**
 * 四级联动 接口 2017-8-24 15:21:39
 * @author wuyanli
 *
 */
@RestController
@RequestMapping("web/deptBuildFloor")
public class DeptBuildFloorController{
	
	@Resource
	private DeptBuildFloorService deptService;

	/**
	 * 科室 楼号 楼层 三级联动  2017年8月24日15:28:53
	 * @param map
	 * @return
	 */
	@RequestMapping("getAllFromDept")
	public SysResult getAllFromDept(){
		User user = LocalManager.getVal(LocalManagerType.USER_WEB);
		List<DeptFloorDto> allDeptInfoList = deptService.getAllFromBuild(user.getHospitalId());
		return SysResult.ok(0, "success", allDeptInfoList);
	}
	
}
